import request from '@/utils/request'

export function getProjectList(params) {
  return request({
    url: 'project/',
    method: 'get',
    params: params
  })
}

export function getProject(id) {
  return request({
    url: 'project/' + id + '/',
    method: 'get'
  })
}

export function createProject(data) {
  return request({
    url: 'project/',
    method: 'post',
    data: data
  })
}

export function updateProject(id, data) {
  return request({
    url: 'project/' + id + '/',
    method: 'patch',
    data: data
  })
}

export function deleteProject(id) {
  return request({
    url: 'project/' + id + '/',
    method: 'delete'
  })
}
